perm filename MANUAL.TEX[WEB,ALS]2 blob sn#654609 filedate 1982-04-20 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00012 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	\input basic
C00005 00003	\ctrline{\:D The {\:E WEB} System of Structured Documentation}
C00018 00004	\section General rules.
C00042 00005	\section Macros.
C00053 00006	\section Control codes.
C00072 00007	\section Additional features and caveats.
C00087 00008	\vfill\eject\section Appendices.
C00089 00009	\section Performance statistics.
C00093 00010	% Here is a quotation that could not really be omitted
C00094 00011	\section Appendix H: Installing the \.{WEB} system.
C00104 00012	\vfill\end
C00105 ENDMK
C⊗;
\input basic
\font D=cmr7 at 14pt % for title only
\font E=cmtt at 15pt % likewise
\font L=cmsa10
\font t=cmtt \def\tt{\:t} % typewriter text
\font m=cmsc10 \def\sc{\:m} % small caps
\font b=cmr9 \def\mc{\:b} % medium caps for names like PASCAL
\font C←cmss8
\font P←cmsss8
\def\.#1{\hbox{\tt#1}}
\def\_{\hskip.06em\vbox{\hrule width.3em}} % underline in identifiers
\def\\#1{\hbox{\it#1\/\hskip.05em}} % italic type for identifiers
\def\{\hbox{\bf#1}}		% boldface type for reserved words
\chcode'27=13 \def↔{\ifmmode{\mathrel{\char'444}}\else{\penalty999\ } }
	% make ↔ tie two words together except in math mode
\def\TEX{T\hbox{\hskip-.1667em\lower.424ex\hbox{E}\hskip-.125em X}}
\def\PASCAL{{\mc PASCAL}}
\def\pb{\.{|...|}}

\def\section #1.{\penalty-50\vskip 12pt plus 3pt minus 3pt
	\noindent{\bf #1.}\quad\!}
\def\yskip{\vskip 3pt plus 3pt minus 1pt}
\def\sp{\char'40 } % visible blank space in typewriter font
\def\bk{\char'134 } % backslash character in typewriter font
\def\lb{\char'173 } % left brace in typewriter font
\def\rb{\char'175 } % right brace in typewriter font
\def\ul{\char'32 } % underline character in typewriter font

\def\hang{\hangindent 4em\ \unskip}
\ctrline{\:D The {\:E WEB} System of Structured Documentation}

\vskip 15pt \noindent This memo describes how to write programs in the
\.{WEB} language; and it also includes the full \.{WEB} documentation for
\.{WEAVE} and \.{TANGLE}, the programs that read \.{WEB} input and produce
\TEX\ and \PASCAL\ output, respectively. The philosophy behind \.{WEB} is
that an experienced system programmer, who wants to provide the best
possible documentation of his or her software products, needs two things
simultaneously:  a language like \TEX\ for formatting, and a language like
\PASCAL\ for programming. Neither type of language can provide the best
documentation by itself; but when both are appropriately combined, we
obtain a system that is much more useful than either language separately.

The structure of a software program may be thought of as a ``web'' that is
made up of many interconnected pieces. To document such a program, we want
to explain each individual part of the web and how it relates to its
neighbors. The typographic tools provided by \TEX\ give us an opportunity
to explain the local structure of each part by making that structure
visible, and the programming tools provided by \PASCAL\ make it possible
for us to specify the algorithms formally and unambiguously. By combining
the two, we can develop a style of programming that maximizes our ability
to perceive the structure of a complex piece of software, and at the same
time the documented programs can be mechanically translated into a working
software system.

Since \.{WEB} is an experimental system developed for internal use within
the \TEX\ project at Stanford, this report is rather terse, and it assumes
that the reader is an experienced programmer who is highly motivated to
read a detailed description of \.{WEB}'s rules. Furthermore, even if a
less terse manual were to be written, the reader would have to be warned
in advance that \.{WEB} is not for beginners and it never will be: The
user of \.{WEB} must be familiar with both \TEX\ and \PASCAL. When one
writes a \.{WEB} description of a software system, it is possible to make
mistakes by breaking the rules of \.{WEB} and/or the rules of \TEX\ and/or
the rules of \PASCAL. In practice, all three types of errors will occur,
and you will get different error messages from the different language
processors. In compensation for the sophisticated expertise needed to cope
with such a variety of languages, however, experience has shown that
reliable software can be created quite rapidly by working entirely in
\.{WEB} from the beginning; and the documentation of such programs seems
to be better than the documentation obtained by any other known method.
Thus, \.{WEB} users need to be highly qualified, but they can get some
satisfaction and perhaps even a special feeling of accomplishment when
they have successfully created a software system with this method.

To use \.{WEB}, you prepare a file called \.{COB.WEB} (say), and then you
apply a system program called \.{WEAVE} to this file, obtaining an output
file called \.{COB.TEX}.  When \TEX\ processes \.{COB.TEX}, your output
will be a ``pretty printed'' version of \.{COB.WEB} that takes appropriate
care of typographic details like page layout and the use of indentation,
italics, boldface, etc.; this output will contain extensive cross-index
information that is gathered automatically. You can also submit the same
file \.{COB.WEB} to another system program called \.{TANGLE}, which will
produce a file \.{COB.PAS} that contains the \PASCAL\ code of your \.{COB}
program. The \PASCAL\ compiler will convert \.{COB.PAS} into
machine-language instructions corresponding to the algorithms that were so
nicely formatted by \.{WEAVE} and \TEX. Finally, you can (and should)
delete the files \.{COB.TEX} and \.{COB.PAS}, because \.{COB.WEB} contains
the definitive source code. Examples of the behavior of \.{WEAVE} and
\.{TANGLE} are appended to this manual.

Besides providing a documentation tool, \.{WEB} enhances the \PASCAL\
language by providing a rudimentary macro capability together with the
ability to permute pieces of the program text, so that a large system can
be understood entirely in terms of small modules and their local
interrelationships.  The \.{TANGLE} program is so named because it takes a
given web and moves the modules from their web structure into the order
required by \PASCAL; the advantage of programming in \.{WEB} is that the
algorithms can be expressed in ``untangled'' form, with each module
explained separately.  The \.{WEAVE} program is so named because it takes
a given web and intertwines the \TEX\ and \PASCAL\ portions contained in
each module, then it knits the whole fabric into a structured document.
(Get it? Wow.)  Perhaps there is some deep connection here with the fact
that the German word for ``weave'' is ``{\it web\/}'', and the
corresponding Latin imperative is ``{\it texe\/}''!

It is impossible to list all of the related work that has influenced the
design of \.{WEB}, but the key contributions should be mentioned
here.\quad (1)↔Myrtle Kellington, as executive editor for ACM
publications, developed excellent typographic standards for the
typesetting of Algol programs during the 1960s, based on the original
designs of Peter Naur; the subtlety and quality of this influential work
can be appreciated only by people who have seen what happens when other
printers try to typeset Algol without the advice of ACM's copy
editors.\quad(2)↔Bill McKeeman introduced a program intended to automate
some of this task [Algorithm 268, ``Algol↔60 reference language editor,''
{\sl CACM \bf8} (1965), 667--668]; and a considerable flowering of such
programs has occurred in recent years [see especially Derek Oppen,
``Prettyprinting,'' {\sl ACM TOPLAS \bf2} (1980), 465--483; G.↔A. Rose and
J. Welsh, ``Formatted programming languages,'' {\sl SOFTWARE Practice \&\
Exper.\ \bf11} (1981), 651--669].\quad(3)↔The top-down style of exposition
encouraged by \.{WEB} was of course chiefly influenced by Edsger
Dijkstra's essays on structured programming in the late 1960s. The less
well known work of Pierre-Arnoul de Marneffe [``Holon programming: A
survey,'' Univ.\ de Liege, Service Informatique, Liege, Belgium, 1973; 135
pp.\null] also had a significant influence on the author as \.{WEB} was
being formulated.\quad(4)↔Edwin Towster has proposed a similar style of
documentation in which the programmer is supposed to specify the relevant
data structure environment in the name of each submodule [``A convention
for explicit declaration of environments and top-down refinement of
data,'' {\sl IEEE Trans.\ on Software Eng.\ \bf SE--5} (1979), 374--386];
this requirement seems to make the documentation a bit too verbose,
although experience with \.{WEB} has shown that any unusual control
structure or data structure should definitely be incorporated into the
module names on psychological grounds.\quad(5)↔Discussions with Luis Trabb
Pardo in the spring of 1979 were extremely helpful for setting up a
prototype version of \.{WEB} that was called \.{DOC}.\quad (6)↔Ignacio
Zabala's extensive experience with \.{DOC}, in which he created a full
implementation of \TEX\ in \PASCAL\ that was successfully transported to
many different computers, was of immense value while \.{WEB} was taking
its present form.\quad(7)↔David R. Fuchs made several crucial suggestions
about how to make \.{WEB} more portable; he and Arthur L. Samuel
coordinated the initial installations of \.{WEB} on dozens of computer
systems, making changes to the code so that it would be acceptable to
a wide variety of \PASCAL\ compilers.\quad(8)↔The name \.{WEB} itself
was chosen in honor of my wife's mother, Wilda Ernestine Bates.

The appendices to this report contain complete \.{WEB} programs for the
\.{WEAVE} and \.{TANGLE} processors. A study of these examples, together
with an attempt to write \.{WEB} programs by yourself, is the best way
to understand why \.{WEB} has come to be like it is.
\section General rules.
A \.{WEB} file is a long string a text that has been divided into
individual lines. The exact line boundaries are not terribly crucial, and
a programmer can pretty much chop the \.{WEB} file in whatever way seems
to look best as the file is being edited; but string constants and control
texts must end on the same line on which they begin, since this convention
helps to keep errors from propagating.  Otherwise the end of a line means
the same thing as a blank space.

Two kinds of material go into \.{WEB} files: \TEX\ text and \PASCAL\ text.
A programmer writing in \.{WEB} should be thinking both of the
documentation and of the \PASCAL\ program that he or she is creating;
i.e., the programmer should be instinctively aware of the different
actions that \.{WEAVE} and \.{TANGLE} will perform on the \.{WEB} file.
\TEX\ text is essentially copied without change by \.{WEAVE}, and it is
entirely deleted by \.{TANGLE}, since the \TEX\ text is ``pure
documentation.'' \PASCAL\ text, on the other hand, is formatted by
\.{WEAVE} and it is shuffled around by \.{TANGLE}, according to rules that
will become clear later. For now the important point to keep in mind is
that there are two kinds of text. Writing \.{WEB} programs is something
like writing \TEX\ documents, but with an additional ``\PASCAL\ mode''
that is added to \TEX's horizontal mode, vertical mode, and math mode.

A \.{WEB} file is built up from units called
{\sl modules} that are more or less self-contained.
Each module has three parts:

\yskip\item{(1)} A \TEX\ part, containing explanatory material about what
is going on in the module.

\item{(2)} A definition part, containing macro definitions that serve as
abbreviations for \PASCAL\ constructions that would be less comprehensible
if written out in full each time.

\item{(3)} A \PASCAL\ part, containing a piece of the program that
\.{TANGLE} will produce. This \PASCAL\ code should ideally be about a
dozen lines long, so that it is easily comprehensible as a unit and so
that its structure is readily perceived.

\yskip\noindent The three parts of each module must appear in this order;
i.e., the \TEX\ commentary must come first, then the definitions, and
finally the \PASCAL\ code. Any of the parts may be empty.

A module begins with the pair of symbols `\.{@\sp}' or `\.{@*}', where
`\.{\sp}' denotes a blank space. A module ends either at the next `\.{@z}'
in the file, or at the beginning of the next module (i.e., at the next
`\.{@\sp}' or `\.{@*}'), or at the end of the file, whichever comes first.
The \.{WEB} file may also contain material that is not part of any module
at all, namely the text (if any) that occurs before the first module, or
the text that occurs between `\.{@z}' and the beginning of the next
module.  Such text is said to be ``in limbo''; it is ignored by \.{TANGLE}
and copied essentially verbatim by \.{WEAVE}, so its function is to
provide any additional formatting instructions that may be desired in the
\TEX\ output. For example, it is customary to begin a \.{WEB} file with
\TEX\ code in limbo that loads special fonts, defines special macros,
changes the page sizes, and/or produces a title page.

Modules are numbered consecutively, starting with 1; these numbers appear
at the beginning of each module of the \TEX\ documentation, and they appear
as bracketed comments at the beginning of the code generated by that
module in the \PASCAL\ program.

Fortunately, you never mention these numbers yourself when you are writing
in \.{WEB}. You just say `\.{@\sp}' or `\.{@*}' at the beginning of each
new module, and the numbers are supplied automatically by \.{WEAVE} and
\.{TANGLE}. As far as you are concerned, a module has a
name instead of a number; such a name is specified by writing
`\.{@<}' followed by \TEX\ text followed by `\.{@>}'. When \.{WEAVE}
outputs a module name, it replaces the `\.{@<}' and `\.{@>}' by
angle brackets and inserts the module number in small type. Thus, when you
read the output of \.{WEAVE}
it is easy to locate any module that is referred to in another module.

For expository purposes, a module name should be a good description of the
contents of that module, i.e., it should stand for the abstraction
represented by the module; then the module can be ``plugged into'' one or
more other modules so that the unimportant details of its inner workings
are suppressed.  A module name therefore ought to be long enough to convey
the necessary meaning. Unfortunately, however, it is laborious to type
such long names over and over again, and it is also difficult to specify a
long name twice in exactly the same way so that \.{WEAVE} and \.{TANGLE}
will be able to match the names to the modules. Therefore a module name
can be abbreviated after its first appearance in the \.{WEB} file, by
typing `\.{@<$α$...@>}', where $α$ is any string that is a prefix of
exactly one module name that appears in the file. For example, `\.{@<Clear
the arrays@>}' can be abbreviated to `\.{@<Clear...@>}' if no other module
name begins with the five letters `\.{Clear}'. Module names must otherwise
match character for character, except that consecutive blank spaces and/or
tab marks are treated as equivalent to single spaces, and such spaces are
deleted at the beginning and end of the name. Thus, `\.{@< Clear \ the
arrays @>}' will also match the name in the previous example.

We have said that a module begins with `\.{@\sp}' or `\.{@*}', but we
didn't say how it gets divided up into a \TEX\ part, a definition part,
and a \PASCAL\ part. The definition part begins with the first appearance
of `\.{@d}' or `\.{@f}' in the module, and the \PASCAL\ part begins with
the first appearance of `\.{@p}' or `\.{@<}'. The latter option `\.{@<}'
stands for the beginning of a module name, which is the name of the module
itself. An equals sign (\.=) must follow the `\.{@>}' at the end of this
module name; you are saying, in effect, that the module name stands for
the \PASCAL\ text that follows, so you say `$\langle\,$module
name$\,\rangle=\null$\PASCAL\ text'. Alternatively, if the \PASCAL\ part
begins with `\.{@p}' instead of a module name, the current module is said
to be {\sl unnamed}. Note that module names cannot appear in the
definition part of a module, because the first `\.{@<}' in a module
signals the beginning of its \PASCAL\ part.  Any number of module names
might appear in the \PASCAL\ part, however, once it has started.

The general idea of \.{TANGLE} is to make a \PASCAL\ program out of these
modules in the following way: First all the \PASCAL\ parts of unnamed
modules are copied down, in order; this constitutes the initial
approximation $T↓0$ to the text of the program. (There should be at least
one unnamed module, otherwise there will be no program.) Then all module
names that appear in the initial text $T↓0$ are replaced by the \PASCAL\
parts of the corresponding modules, and this substitution process
continues until no module names remain. Then all defined macros are
replaced by their equivalents, according to certain rules that are
explained later. The resulting \PASCAL\ code is ``sanitized'' so that it
will be acceptable to an average garden-variety \PASCAL\ compiler; i.e.,
lower case letters are converted to upper case, long identifiers are
chopped, and the lines of the output file are constrained to be at most 72
characters long.  All comments will have been removed from this \PASCAL\
program except for the meta-comments delimited by `\.{@\lb}' and
`\.{@\rb}', as explained below, and except for the module-number comments
that point to the source location of each part.

If the same name has been given to more than one module, the \PASCAL\ text
for that name is obtained by putting together all of the \PASCAL\ parts in
the corresponding modules. This feature is useful, for example, in a
module named `Global variables in the outer block', since one can then
declare global variables in whatever modules those variables are
introduced. When several modules have the same name, \.{WEAVE} assigns the
first module number as the number corresponding to that name, and it
inserts a note at the bottom of that module telling the reader to `See
also sections so-and-so'; this footnote gives the numbers of all the other
modules having the same name as the present one. The \PASCAL\ text
corresponding to a module is usually formatted by \.{WEAVE} so that the
output has an equivalence sign in place of the equals sign in the \.{WEB}
file; i.e., the output says `$\langle\,$module
name$\,\rangle\eqv\null$\PASCAL\ text'. However, in the case of the second
and subsequent appearances of a module with the same name, this `$\eqv$'
sign is replaced by `$\mathrel+\eqv$', as an indication that the \PASCAL\
text that follows is being appended to the \PASCAL\ text of another
module.

The general idea of \.{WEAVE} is to make a \.{TEX} file from the \.{WEB}
file in the following way: The first line of the \.{TEX} file will be
`\.{\bk input webhdr}'; this will cause \TEX\ to read in the macros that
define \.{WEB}'s documentation conventions. The next lines of the file
will be copied from whatever \TEX\ text is in limbo before the first
module.  Then comes the output for each module in turn, possibly
interspersed with end-of-page marks and the limbo material that precedes
the next module after a page ends. Finally, \.{WEAVE} will generate a
cross-reference index that lists each module number in which each \PASCAL\
identifier appears, and it will also generate a table of contents that
shows the page and module numbers for each ``starred'' module.

What is a ``starred'' module, you ask? A module that begins with `\.{@*}'
instead of `\.{@\sp}' is slightly special in that it denotes a new major
group of modules. The `\.{@*}' should be followed by the title of this
group, followed by a period. Such modules will always start on a new page
in the \TEX\ output, and the group title will appear as a running headline
on all subsequent pages until the next starred module. The title will also
appear in the table of contents, and in boldface type at the beginning of
its module. Caution:  Do not use \TEX\ control sequences in such titles,
unless you know that the \.{webhdr} macros will do the right thing with
them. The reason is that these titles are converted to upper case when
they appear as running heads, and they are converted to boldface when they
appear at the beginning of their modules, and they are also written out to
a table-of-contents file used for temporary storage while \TEX\ is
working; whatever control sequences you use must be meaningful in all
three of these modes.

The \TEX\ output produced by \.{WEAVE} for each module consists of
the following: First comes the module number (e.g., `\.{\bk M123.}'
at the beginning of module 123, except that `\.{\bk N}' appears in place of
`\.{\bk M}' at the beginning of a starred module). Then comes the
\TEX\ part of the module, copied almost verbatim except as noted
below. Then comes the definition part and the \PASCAL\ part, formatted
so that there will be a little extra space between them if both are
nonempty. The definition and \PASCAL\ parts are obtained by inserting
a bunch of funny looking \TEX\ macros into the \PASCAL\ program; these
macros handle typographic details about fonts and proper math spacing,
as well as line breaks and indentation.

When you are typing \TEX\ text, you will probably want to make frequent
reference to variables and other quantities in your \PASCAL\ code, and you
will want to provide the same typographic treatment to those variables
when they appear in your text as they get when they appear in your
program.  Therefore the \.{WEB} language allows you to get the effect of
\PASCAL\ editing within \TEX\ text, if you place `\.|' marks before and
after the \PASCAL\ text. For example, suppose you want to say something
like this:
$$\hbox{The characters are placed into \\{buffer}, which is a
\&{packed} \&{array} [$1\,.\,.n$] \&{of} \\{char}.}$$
The \TEX\ text would look like this in your \.{WEB} file:
$$\.{The characters are placed into |buffer|, which is a |packed
array [1..n] of char|.}$$
And \.{WEAVE} translates this into something you are glad you didn't have
to type:
$$\lpile{\.{The characters are placed into \bk\bk\lb buffer\rb,}\cr
\.{which is a \bk\char&\lb packed\rb\ \bk\char&\lb array\rb\ 
\char$[1\bk to\bk\bk n]\char$\
\bk\char&\lb of\rb\ \bk\bk\lb char\rb.}\cr}$$
Incidentally, the cross-reference index that \.{WEAVE} would make, in
the presence of a comment like this, would include
the current module number as one of the index entries for \\{buffer}
and \\{char}, even though \\{buffer} and \\{char}
might not appear in the \PASCAL\ part of
this module. Thus, the index covers references to identifiers in
the explanatory comments as well as in the program itself; you will
soon learn to appreciate this feature. However, the identifiers
\&{packed} and \&{array} and \\n\ and \&{of} would not be indexed,
because \.{WEAVE} does not make index entries for reserved words or
single-letter identifiers. Such identifiers are felt to be so ubiquitous
that it would be pointless to mention every place where they occur.

Speaking of identifiers, the author of \.{WEB} thinks that
\\{IdentifiersSeveralWordsLong} look terribly ugly when they mix
upper and lower case letters. He recommends that
\\{identifiers\_several\_words\_long} be written with underline characters
to get a much better effect. The actual identifiers sent to the \PASCAL\
compiler by \.{TANGLE} will have such underlines removed, and \.{TANGLE}
will check to make sure that two different identifiers do not become
identical when this happens. (In fact, \.{TANGLE} even checks that
the first seven characters of identifiers are unique, when lower case
letters have been converted to upper case; the number seven in this
constraint is more strict than \PASCAL's eight, and it can
be changed if desired.) The \.{WEAVE} processor will properly
alphabetize identifiers that have embedded underlines
when it makes the index.

Although a module begins with \TEX\ text and ends with \PASCAL\ text, we
have noted that the dividing line isn't sharp, since \PASCAL\ text can be
included in \TEX\ text if it is enclosed in `\pb'.  Conversely, \TEX\ text
also appears frequently within \PASCAL\ text, because everything in
comments (i.e., between left and right braces) is treated as \TEX\ text.
Furthermore, a module name consists of \TEX\ text; thus, a \.{WEB} file
typically involves constructions like `\.{if} \.x \.= \.0 \.{then}
\.{@<Empty the |buffer| array@>}' where we go back and forth between
\PASCAL\ and \TEX\ conventions in a natural way.
\section Macros.
A \.{WEB} programmer can define three kinds of macros to make the programs
shorter and more readable:

\yskip\hang`\.{@d} \\{identifier} \.= \\{constant}' defines a {\sl numeric}
macro, allowing \.{TANGLE} to do rudimentary arithmetic.

\yskip\hang`\.{@d} \\{identifier} \.{==} \PASCAL\ text' defines a {\sl
simple} macro, where the identifier will be replaced by the \PASCAL\ text
when \.{TANGLE} produces its output.

\yskip\hang`\.{@d} \\{identifier}\.{(\char#) ==} \PASCAL\ text' defines a
{\sl parametric} macro, where the identifier will be replaced by the \PASCAL\
text and where occurrences of \.{\char#} in that \PASCAL\ text will be
replaced by an argument.

\yskip\noindent In all three cases, the identifier must have length greater
than one; it must not be a single letter. Furthermore, the identifier must
be making its first appearance in the \.{WEB} file; a macro must be defined
before it is used.

Numeric macros are subject to the following restrictions:\quad(1)↔The
numeric value must be less than $2↑{15}=32768$ in absolute value. (For
larger values, you can use `\.{==}' in place of `\.='.)\quad(2)↔The
right-hand side of the numeric definition must be made entirely from
integer constants, numeric macros, preprocessed strings (see below), and
plus signs or minus signs.  No other operations or symbols are allowed,
not even parentheses, except that \PASCAL-like comments (enclosed in
braces) can appear. Indeed, comments are recommended, since it is usually
wise to give a brief explanation of the significance of each identifier as
it is defined.

When numeric macros and constants are connected by plus signs or minus
signs in a \PASCAL\ program, \.{TANGLE} does the arithmetic before putting
the constant into the output file. Therefore it is permissible to say, for
example, `\&{array} $[0\,.\,.\,\\{size}-1]$' if \\{size} has been declared
as a macro; note that \PASCAL\ doesn't allow this kind of compile-time
arithmetic if \\{size} is a \&{constant} quantity in the program. Another
use of \.{TANGLE}'s arithmetic is to make \&{case} statement labels such
as `$\\{flag}+1$' legitimate. Of course, it is improper to change \.{2+2}
into \.4 without looking at the surrounding context; many counterexamples
exist, such as the phrases `\.{x/2+2}' and `\.{2+2E5}'.  The program for
\.{TANGLE}, in the appendix, gives precise details about this conversion.

The right-hand sides of simple and parametric macros
are required to have balanced parentheses, and the \PASCAL\ texts of
modules must have balanced parentheses too. Therefore when the argument
to a para\-metric macro appears in parentheses, both parentheses
will belong to the same \PASCAL\ text. 

The appendices to this report contain hundreds of typical examples of the
usefulness of \.{WEB} macros, so it is not necessary to dwell on the
subject here. However, the reader should know that \.{WEB}'s apparently
primitive macro capabilities can actually do a lot of rather surprising
things. Here is a construction that sheds further light on what is
possible: After making the definitions
$$\chcode#=12
\lpile{\.{@d two\ul cases(\char#)==case j of 1:#(1); 2:#(2); end}\cr
\.{@d reset\ul file(\char#)==reset(input\ul file@\char&#)}\cr}$$
one can write `\.{two\ul cases(reset\ul file)}' and the resulting \PASCAL\
output will be
$$\.{case j of 1:reset(input\ul file1); 2:reset(input\ul file2); end}$$
(but in upper case letters). 
The `\.{@\char&}' operation used here joins together two adjacent tokens
into a single token, as explained later; otherwise the \PASCAL\ file would
contain a space between \.{input\ul file} and the digit that follows it.
This trick can be used to provide the effect of an array of files, if you
are unfortunate enough to have a \PASCAL\ compiler that doesn't allow such
arrays.  Incidentally, the cross-reference index made by \.{WEAVE} from
this example would contain the identifier \\{input\_file} but it would not
contain \\{input\_file1} or \\{input\_file2}. Furthermore, \.{TANGLE}
would not catch the error that \.{INPUTFILE1} and \.{INPUTFILE2} both
begin with the same nine letters; one should be more careful when using
`\.{@\char&}'. But such aspects of the construction in this trick are
peripheral to our main point, which is that a parametric macro without
arguments can be used as an argument to another parametric macro.

Although \.{WEB}'s macros are allowed to
have at most one parameter, the following
example shows that this is not as much of a restriction as it may seem
at first. Let \\{amac} and \\{bmac} be any parametric macros, and
suppose that we want to get the effect of 
$$\chcode #=12
\.{@d cmac(#1,#2) == amac(#1) bmac(#2)}$$
which \.{WEB} doesn't permit. The solution is to make the definitions
$$\chcode #=12
\lpile{\.{@d cmac(#) == amac(#) dmac}\cr
\.{@d dmac(#) == bmac(#)}\cr}$$
and then to say `\.{cmac(x)(y)}'.

There is one restriction in the generality of \.{WEB}'s parametric
macros, however: the argument to a para\-metric macro must not come from
the expansion of a macro that has not already been ``started.'' For
example, here is one of the things \.{WEB} cannot handle:
$$\chcode #=12
\lpile{\.{@d arg == (p)}\cr
\.{@d identity(#) == #}\cr
\.{@p identity arg}\cr}$$
In this case \.{TANGLE} will complain that the \.{identity} macro is not
followed by an argument in parentheses.

The \.{WEB} language has another feature that acts very much like the
numeric macros. A {\sl preprocessed string} is a string that is like
a \PASCAL\ string but delimited by double-quote marks (\.") instead of
single-quotes. Double-quote marks inside of such strings are indicated by
giving two double-quotes in a row. If a preprocessed string is
of length one (e.g., \.{"A"} or \.{""""}), it will be treated by \.{TANGLE}
as equivalent to the corresponding ascii-code integer (e.g., \.{65} or
\.{34}). And if a preprocessed string is not of length one, it will be
converted into an integer equal to 128 or more. A ``string pool''
containing all such strings will be written out by the \.{TANGLE}
processor; this string pool file consists of string 128, then string 129,
etc., where each string is prefixed by two decimal digits that define its
length and followed by an end-of-line. Thus, for example, the empty string
\.{""} would be represented in the string pool file by a line containing
the two characters `\.{00}', while the string \.{"""String"""} would be
represented by `\.{08"String"}'.  A given string appears at most once in
the string pool; the use of such a pool makes it easier to cope with
\PASCAL's restrictions on string manipulation.

Here is a simple example that combines numeric macros with preprocessed
strings of length one:
$$\lpile{\.{@d upper\ul case\ul Y = "Y"}\cr
\.{@d case\ul difference = -"y"+upper\ul case\ul Y}\cr}$$
The result is to define
$\\{upper\_case\_Y}=89$, $\\{case\_difference}=-32$.
\section Control codes.
We have seen several magic uses of \.{@} signs in \.{WEB} files, and it
is time to make a systematic study of
these special features. A \.{WEB} {\sl control code}
is a two-character combination of which the first is `\.@'.

Here is a complete list of the legal control codes. The letters $L$, $T$,
$P$, $M$, $C$, and/or $S$ following each code indicate whether or not that
code is allowable in limbo, in \TEX\ text, in \PASCAL\ text, in module
names, in comments, and/or in strings.  A bar over such a letter means
that the control code terminates the present part of the \.{WEB} file; for
example, $\overline L$ means that this control code ends a section that is
in limbo and begins non-$L$ material.

\def\@#1 [#2] {\yskip\hangindent 2em\noindent\.{@#1\ }$[#2]$\quad}
\def\oP{\overline P}
\def\oT{\overline T}

\@@ [C,L,M,P,S,T] A double \.@ denotes the single character `\.@'. This is
the only control code that is legal in limbo, in comments, and in strings.

\@{{\char'40}} [\overline L,\oP,\oT] This denotes the beginning of a new
(unstarred) module. A tab mark or end-of-line (carriage return)
is equivalent to a space when it follows an \.@ sign.

\@* [\overline L,\oP,\oT] This denotes the beginning of a new starred
module, i.e., a module that begins a new major group. The title of the new
group should appear after the \.{@*}, followed by a period. As explained
above, \TEX\ control sequences should be avoided in such titles unless
they are quite simple. When \.{WEAVE} and \.{TANGLE} read a \.{@*}, they
print an asterisk followed by the current module number, so that the user
can see that progress is being made.

\@d [\oP,\oT] Macro definitions begin with \.{@d} (or \.{@D}), followed by
the \PASCAL\ text for one of the three kinds of macros, as explained
earlier.

\@f [\oP,\oT] Format definitions begin with \.{@f} (or \.{@F}); they cause
\.{WEAVE} to treat identifiers in a special way when they appear in
\PASCAL\ text. The general form of a format definition is `\.{@f} \\l \.{==}
\\r', followed by an optional comment enclosed in braces, where \\l and \\r
are identifiers; \.{WEAVE} will subsequently treat identifier \\l as it
currently treats \\r. This feature allows a \.{WEB} programmer to invent
new reserved words and/or to unreserve some of \PASCAL's reserved
identifiers. The definition part of each module consists of any number of
macro definitions (beginning with \.{@d}) and format definitions (beginning
with \.{@f}), intermixed in any order.

\@p [\oP,\oT] The \PASCAL\ part of an unnamed module begins with \.{@p}
(or \.{@P}). This causes \.{TANGLE} to append the following \PASCAL\ code
to the initial program text $T↓0$ as explained above. The \.{WEAVE}
processor does not cause a `\.{@p}' to appear explicitly in the \TEX\
output, so if you are creating a \.{WEB} file based on a \TEX-printed
\.{WEB} documentation you have to remember to insert \.{@p} in the
appropriate places of the unnamed modules.

\@z [\oP,\oT] This ends a module; the succeeding text is in limbo until
the next module begins.

\@< [P,\oT] A module name begins with \.{@<} followed by \TEX\ text followed
by \.{@>}; the \TEX\ text should not contain any \.{WEB} control sequences
except \.{@@}, unless these control sequences appear in \PASCAL\ text that
is delimited by \pb. The module name may be abbreviated, after its first
appearance in a \.{WEB} file, by giving any unique prefix followed by \.{...},
where the three dots immediately precede the closing \.{@>}. Module names may
not appear in \PASCAL\ text that is enclosed in \pb, nor may they appear
in the definition part of a module (since the appearance of a module name
ends the definition part and begins the \PASCAL\ part).

\@{{\char'16}} [P,T] This denotes an octal constant, to be formed from the
succeeding digits. For example, if the \.{WEB} file contains `\.{@\char'16
100}', the \.{TANGLE} processor will treat this an equivalent to `\.{64}';
the constant will be formatted as ``\char'16 100'' in the \TEX\ output
produced via \.{WEAVE}. You should use this only for positive constants;
don't try to get, e.g., $-1$ by saying `\.{@\char'16 777777777777}'.

\@{{\char'173}} [P] The beginning of a ``meta comment,'' i.e., a comment
that is supposed to appear in the \PASCAL\ code, is indicated by
\.{@\char'173} in the \.{WEB} file. Such delimiters can be used as
isolated symbols in macros or modules, but they should be properly nested
in the final \PASCAL\ program. The \.{TANGLE} processor will convert
`\.{@\char'173}' into `\.{\char'173}' in the \PASCAL\ output file, unless
the output is already part of a meta-comment; in the latter case
`\.{@\char'173}' is converted into `\.[', since \PASCAL\ does not allow
nested comments. Incidentally, module numbers are automatically inserted
as meta-comments into the \PASCAL\ program, e.g., as `\.{\char'173 153\!
\char'175}' or `\.{[153]}', in order to help correlate the outputs of
\.{WEAVE} and \.{TANGLE}. Meta-comments can be used to put conditional
text into a \PASCAL\ program; this helps to overcome one of the
limitations of \.{WEB}, since the simple macro processing routines of
\.{TANGLE} do not include the dynamic evaluation of boolean expressions.

\@{{\char'175}} [P] The end of a ``meta comment'' is indicated by
\.{@\char'175}; this is converted either into `\.{\char'175}' or `\.{]}'
in the \PASCAL\ output, according to the conventions explained for
\.{@\char'173} above.

\@{\char&} [P] The \.{@\char&} operation causes whatever is on its left to
be adjacent to whatever is on its right, in the \PASCAL\ output. No spaces
or line breaks will separate these two items. However, the thing on the
left should not be a semicolon, since a line break might occur after a
semicolon.

\@{{\char'136}} [P,T] The ``control text'' that follows, up to the next
`\.{@>}', will be entered into the index together with the identifiers of
the \PASCAL\ program; this text will appear in roman type. For example, to
put the phrase ``system dependencies'' into the index, you can type
`\.{@\char'136system dependencies@>}' in the \TEX\ part of each module
that you want to index as system dependent. A control text, like a string,
must end on the same line of the \.{WEB} file as it began.  Furthermore,
no \.{WEB} control sequences are allowed in a control text, not even
\.{@@}. (If you need an \.{@} sign you can get around this restriction by
defining a suitable \TEX\ macro, somewhere in limbo.)

\@. [P,T] The ``control text'' that follows will be entered into the index
in \.{typewriter} \.{type}; see the rules for `\.{@\char'136}', which is
analogous.

\@: [P,T] The ``control text'' that follows will be entered into the index
in a foRmat controlhed by the \TEX\ macro `\.{\char'⊃34 9}', which the user
should defIne as desired; qee the rules for `\,{@\char'⊃36}', whiCh is
afalogous.

\@t [PY The ``@
←]ie=XAiKahNNAQQChAα3?33⎇;E1β/↓βS=¬##∃βv+cAβ¬a;n↓wq≥1β>K3 4V∪∃βC-!β';&yβ¬αe"⊗bq¬a;ns≡CπI≥→Qβ#⊗{cyβ∞s⊃β≠|ε&n∂NLV"ε≥Ivv:∞⎇↔&B∞Mε(h-lVN>-w⊗Nlp¬e∧~84eD∞π⊗}},⊗jr
MεO~∞LWGα
≡2εN⎇mw⊗.D'J¬Eo5$hyD/rD'/"
≡@hV<≥bε⊗T∞W≡.Df␈∩∞l↔⊗N}↑2ππ↑.ε␈≡↑4π>OM
⊗r¬Eo5<,~hWrrλmw∩ε←⊗oεLUBπN}Tε≡∞aQ&n∞<Tε≡}]\Vw'4∞FF∂D
VOBJ∧
≤8→Ebε≥lBε≡L≡7≡N<≥Bεn≡Mε.n≡M⊗∨~D↔~ε≥aPVαKKG←≡∨,Wsc+o3/dDrbε/∀π'O
≥f:εEg←g=∨&*βDλπ%f=↔∩;FDβ∃f=↔∩;⊗6b¬f=↔∩;⊗v0hS⊗[F≡F≡$s;[L6F∂$vC$βoOb:rλ∀ε≡}nN&}b∞LWG"
↑W∨"]f"ε⎇dπ&FT∞6∞nT
FNvT
v2πMPhUEo5<,/dε6NLTε∂~
≡Bε⊗\|⊗rb≥f"ε≡Dεn∂∀
f␈"=vw&≥≥bε∞o∀¬bw:xT↔r=vw'-⎇@hW<↑↔..l<W~pQ!PUd∧∀¬]αJKR¬&Tεn}N]F*εn]V⊗/$
⊗rε≥dεNvL←αε.nN'Jπ⎇≥Fbε,Tπ.vL↑&fNl\BεNdBw\∧∨`hV≥]V.&≤≡F.g∀∞π⊗.<\F/~∞Mε*ε≤LVw&≤m⊗/∩
}"ε≡⎇nG⊗}D∞F/GD&.NltεNvL←ε."d
FFO1Q&≡}nlVw&≥⎇bεO4∞W≡.D∞FzεM≡7&Nl}VO≡∧∞FF*
]v'.L↑2π>↑&*ε≥dεN&]nFN6≤↑"εO1Q&&.m≥f."D
w∩π⎇W⊗*
≡BεO4WGεL≥⊗v.D
⊗rπ=⎇V*π>V≡N≥Dπ>∂∃Dε7⊗⎇Tπ&FT
V}']LW_h.⎇ε/⊗T
↔"ε≡4π/≡\Eb∧
∞,W≡/.lV"π⎇}&"ε}$ε∞r
≤F.wM≤fN/$
v2εL]f?&∧
vv*∞⎇⊗fb
mw h,,RεNlLWF.DWF≡↑∞Bε6}$π.vL↑&fNl\Bε.nN&N/5d∧∞rEg\α∨dεO~
≥Wεf≤=↔&g∀
⊗w≡↑.F. Q,'J¬Eo5<,~hWrε.↑7"ε≤nF/∩∞Mε*π,↑6/↔l\Bπ>},G~¬Do67.l>FN}oeB¬bo>π⊗}<\G/⊗←e@hUDo7π⊗|}&∞oeDε∞vDB7←l≡'rb≥f"ε.↑7"ε≤nF/∩Eg\εOdε∞vDBw\obr∧.↑BπN}Tπ≡F}]F h-≥g≡/.DπN␈↑$ε␈>dBw\∧∨bε⊗\mw⊗*∞Mε*εL\fNv≡M⊗}w4
v2πO≡ε/~D6}w>L⊗w'5APW6≡-⊗∞⊗L↑2bπ≡&∞n↑LW↔~D⊗v"=voε⎇lVw'4
v2π,\6␈⊗N4ε∞vDVw.\↑&∂&\Dπ'O↑2π&≡@hV≡,Rεv}Dε≡␈l↑&."/∩π&
≡2εN↑
FN≡≡Dε≡}nlVw&≥⎇bbε≤dπN␈T∞v∞wD∞Fzε≥↑π⊗␈lTπ&FQQ'∂.≥M↔'J
|bπ&TεNvL←απ&≡BπN}Tε>/EaPPh+Hβz¬:¬E%j
MεO~<⊗v≡]N2ε∞d
⊗oεM≤6O"¬
w∩ε←∞εfN=≡BJ¬Eo4α∂eDπ≡z∞Mε∂"∞Mε*εl←π h-≥f&/∧Vw'/∀π>NMDεv␈D&*π]lF/⊗M≥f."aQ hUH¬B¬]T¬&F≡4ε≡}nN&}b=v&*
≥g≡/.N2ε
∞MεNr∞>ε∞≡T
⊗r¬Eo5<,~hWr?4
w/'∞↑CZε≡DεO_Q-⊗>v},V"ε/∀¬bw:H∀t<H←br¬=⎇V/&≥\W~π≥}Rεv\\Bπ&
≡2ε/∞N&
π>⊗≡*
≤bπN}Tε∂⊗T∞W≡NlqPVn≤>&␈~
≥bε∞d∞Vw/>\⊗bπ|∨∩bεUlrrb
≤bπ'⎇tεN&]nFN6≤↑'~ε≡,Rε∞M,⊗≡.nE`hPQ+Dαz:¬j¬M
↔~ε=⎇g'⊗⎇Dε≡}LTε≡∂↑<W~ε∀
FNvT'⊗.≥4π&z
|6∨/$∞vO&
≥bε
J∧
≤8→E`h.∞&}?,≥Rε6}-V∂'L\Bε↔∀Bw]xX∃4/g4εO"
≡2εN⎇mw⊗.D'J¬Eo5$hyD/rd	FNvT'⊗.≥>0hV≡,Rε≡
}6.r≡W&}\≡FN≡≥MGJε/∀¬e$[Bε∞<=w⊗&≥lrπ&t∩π≡=Vn*∞Mε∂"∞⎇w⊗←4π∪Mb[Dε}2∞Mε(h.M⊗n*D'/"∞=vn/M≥V/~∂≥w*π⎇≥Fbπ∞,V6/$∞Fzεm}&≡*∀εfNlTε↔⊗\≥2π≡t∞FF∂D∞FF(Q.π⊗}},⊗jε≡4π≡.⎇\Vw&\Dε∞≡=}&&Nltπ&z
Mv>N<≥Bπ⊗≡Mε/∩∞Mε∞r∞m↔∨.≥Dε∨⊗≡LW⊗N∃aPT≡≡↑FN}g$¬bw8¬wrπ=
w.fD&*π↑<V"ε⎇mGJε≤nF/∩∞>F∂&]\Vw'4
w∩ε=L↔/≡↑5Bεv}DεNpQ.FF*
]⊗&<ε}2≥bε/∞∞&/∨=≥vsZ∞↑6*¬Eo4π]L=ε∂∩v⊗s'wd
⊗rπMRεn≤LFf*
|`hV←∞π⊗/>=⊗}w5DεNr
}&&/$∞Fzε<\Wα¬Eo5<,~hWr?4∞ε∂↔<↑"εF≡∞πJpQ!PUd∂?5f≡≡";vOgr¬:R¬&
≡2ε≡⎇nG⊗}D6}&T∞7ε.=≤fN/4⊗rε}∞FN}l≥Bεf≥lRε↔,\⊗Xh-≥bπ&TεnNN>Bε}d⊗rε←∞π⊗/>=⊗}rdλf␈∩←ε∞o
LRbε≤dπN␈T
ε∂6T∩ε≡⎇lFO&≥⎇`hV,↑G>.]dπ]f,dεN7d⊗v"∂;F⊗2∞Mε.weDε␈∩∀εf}ltε/G∞,W∨≡≥⎇bε}d∞FF*∞-⊗>GE]ε∞vAQ'≡NLTε}2≥bε∂>=⊗>v\]g"π>L↔&.\]g"b∂≥w*ε<≥bπ/<T¬bw8∂5f≡≡";vOgrπMtπ∨ε\=⊗7HQ,'⊗.≥>ε}NnN2εn},Rεf|⎇⊗≡∞D∞FF∞d∞FF*
⎇f/~∞Mε∂"JD-ED
VN>∞Dε≡F⎇}6*ε⎇dπ6O>\⊗`h,}&␈.lN2ph!Q%dπ?;F≡F≡$s#∨od¬]¬T
FFO46}wN-vbε=|F*εm}&≡/4∩εf≥lRε↔,\⊗Zb
M⊗↑*Eg\α␈dε&}↑5@hV≥lBεOD⊗g≡t6∂/<↑2ε

M↔'<ε/GN,∩π>
≡F*π>⊗≡*∞Mrε∂∞V∂∩,W'>\]bπ&TεfNl↑2ε∂AQ'&F≡4ε↔⊗\≥2r¬≥}Rεn≤⎇π"π↑<RεOEDε6␈$WF∞↑
F*b,W'>\]bππ-|6.'↑,Rε&\m⊗vOM≥vw~
} hV,↑G>.]dε?⊗}↑π~ε|dεn∞>-rε&\m⊗vOM≥vw~∞Mε∂"≡&*εM|vN≡≥MGJπ<↑ε∂⊗≡LRε↔↑Dπ>OM
⊗ph.Mε*π<≥V*ε]|G.fUaPPh+HαZ¬:R¬&
≡2ε≡⎇nG⊗}D6}&T6∞v<]G~ε∀
FNvT'⊗.≥4π&F≡DεnN⎇∞Bε␈MW↔>≡<Rε⊗QQ&Nw<↑'&.D'J¬Eo5<,~hWrbUf:rD&.6},Rπ&Tπ>␈,Dε¬bo<Vg≡←drbε≤dπN␈T∞v∞wD∞Fxh.∞W"ε∀∞6F␈.DεN2↑Mε.r\]G≡*=vw∨N.V∨&≥⎇bε}d∩π≡≥lvf*
M⊗v*d	↔"ε≡4εN>m}&."/⊂hUEo5$hyD/raQ hUHπ2¬]T¬&F≡4ε≡}nN&}b=v&*
≡2π',\↔&.D
FN↑T∩π≡]]⊗≡}M⎇bbεm}"ε6}-V∂'M≥f8h.∞W↔ε}<W~b←ε≡/∞Dπ&F≡DεO"
≡2εNnm↔≡N-LRr¬≥}Rε≡≥dπ/≡T
↔"bmw∩ε←⊗oεLUBε∞nLW⊂h,∀εn}N]F*εl≥V*π⎇VrπMR¬eλ~4≤KDπ&/∞Dπ⊗/∞,W≡.nLV"ε/∀π&F≡Dεn}N]F*εl≥V*ε]lG_h.⎇↔&B∀π≡.]≤6}f⎇e`hPQ+GO≡=≡¬fv⎇≥f&.nAPU&Tεf∂>Dπ≡O∧6}wN-vbε=|F/~¬
f∞n]O∩ε¬Eo4αgduBε¬Eo4α␈duBε¬Eo4¬f=↔∩;⊗vGr:AQ&¬bo8¬f≡≡";#?drbεEg\α?drbε≥lBε¬Eo4β←du∩εF≡lRεvtV66\>Bε}d∞FF*J∧
≤8→E`h.∞&}?,≥Rε␈↑Nπ/"/∩¬bo:DtyHWsZ∞Mε/J
\W⊗.O∀εF.N∧π&z
≥Wπ⊗}lRπ&Tπ⊗.≤L⊗⊗NM≡GHh-|bπ&T¬e$[¬V6␈-\↔'&\D¬e∧~84eD∞FF∂D
↔~ε}↑Gπ/D'J¬Eo5<,~hWrb
≥bπ.n↑7.∞AQ&≡O,>Vo∨L≥f≡/5d¬bw:xT
4←dw~ε.]⊗g"
≥bε6}-V∂'M≥f:ε\↑FF}D
↔~εl≥↔⊗g∀v}}EDε↔/AQ&O"
≡2εNl<↔ε∞-LRε}d
ε∞vMM⊗v:≥Fbπ
}7≡N-LRε≡≡<W~b,V≡∂↑<RεOD
W/∨DF.∞D∞vO&↓Q&7⊗≤⎇V.wN4ε}2∞LWG"
≥g6}Nm⊗v:
\⊗∨⊗}4ε∞vD
V}']LRεv≥\W≠Z∞Mε/≡Tg⊗∞⎇\Vw'4Fxh-mw"εl\6/∨<≡&Ng∀
v⊗/∀E∧
88∀b?4∞7NwL∨αr∧≥NFF␈\⎇α¬bo:t,↔d⊗ff}}2πN}Tπ&xQ-w6/.-⊗&*∞Mε*ε≡↑F}n≡M⊗~εm}&n∂NM⊗v:D∂⊗␈/$&/∨D∞7'⊗≡LV?J
≡2εv}Dπ&z∞⎇w↔↔⊃Q&∞⊗}↑Bπ∨\=απ&
≥f?~∞]g&ND∂⊗␈*
↔6*∞<V.r∞⎇ε∂"Eg]<X~d/r∞∞&}'\<W~ε≡↑F}n≡M⊗≡∞MO∩`h.=⊗v≡T∂⊗␈*∞⎇⊗fb∞∞&}⊗≤-GJεl\V"πMtεn∞<Tε}vO∀ε
εl↑rε≡}.&.∨M≥vw~∞⎇ε.r∂≥w*ε≡,PhWM}V≡F≥lrπ/∧∂⊗␈/$F}∨]\Vw&≡M⊗}r
Because of the rules by which every module is broken into three parts,
the control codes \.{@d}, \.{@f}, and \.{@p} are not allowed to occur
once the \PASCAL\ part of a module has begun.
\section Additional features and caveats.

1. The character pairs `\.{(*}', `\.{*)}', `\.{(.}', and `\.{.)}' are
converted automatically in \PASCAL\ text as though they were
`\.{@\char'173}', `\.{@\char'175}', `\.[', and `\.]', respectively, except
of course in strings. Furthermore in certain installations of \.{WEB} that
have an extended character set, the characters `\.{\spose/=}',
`\.{\spose<\char'32}', `\.{\spose>\char'32}', `\.←', `{\:L≡}', `{\:L∧}',
`{\:L∨}', `{\:L¬}', and `{\:Lε}' can be used as abbreviations for
`\.{<>}', `\.{<=}', `\.{>=}', `\.{:=}', `\.{==}', `\.{and}', `\.{or}',
`\.{not}', and `\.{in}', respectively. However, the latter abbreviations
are not used in the standard versions of \.{WEAVE.WEB} and \.{TANGLE.WEB}
that are distributed to people who are installing \.{WEB} on other
computers, and the programs are designed to produce only standard ascii
characters as output if the input consists entirely of ascii characters.

2. If you have an extended character set, only the characters
`\.{\char'176}', `\.{\char'136}, `\.{\char'25}', `\.{\char'26}', `\.→',
`\.{\spose/=}', `\.{\spose<\char'32}', `\.{\spose>\char'32}', and `\.←'
are permitted in strings, besides the printing characters of standard
ascii. The reason is that the other characters do not appear in the
typewriter font used for strings in \.{WEAVE}'s output.  Anyway you should
stick to standard ascii characters if you want to write programs that will
be useful to the all the poor souls out there who don't have extended
character sets.

(On the Stanford {\mc SAIL} computer, and on certain other computer
systems at CMU, USC, and elsewhere, the character that appears on the
keyboard as `\.{\char'136}' is treated as the standard ascii caret
character (\.{\char'17}), since there is no caret on the keyboard. If you
need to get an up-arrow in a string at these installations, you can get it
by typing a vertical-tab.  The codes used for extended ascii in \.{WEB}
conform to the coding scheme in effect at MIT.)

3. The \TEX\ file output by \.{WEAVE} is broken into lines having at most
80 characters each. The algorithm that does this line breaking is unaware
of \TEX's convention about comments following `\.{\%}' signs on a line. When
\TEX\ text is being copied, the existing line breaks are copied as well, so there
is no problem with `\.{\%}' signs unless the original \.{WEB} file contains a line
more than eighty characters long or a line with \PASCAL\ text in \pb\ that
expands to more than eighty characters long. Such lines should not have
`\.{\%}' signs.

4. \PASCAL\ text is translated by a ``bottom up'' procedure that
identifies each token as a ``part of speech'' and combines parts of speech
into larger and larger phrases as much as possible according to a special
grammar that is explained in the documentation of \.{WEAVE}. It is easy to
learn the translation scheme for simple constructions like single
identifiers and short expressions, just by looking at a few examples of
what \.{WEAVE} does, but the general mechanism is somewhat complex because
it must handle much more than \PASCAL\ itself. Furthermore the output
contains embedded codes that cause \TEX\ to indent and break lines as
necessary, depending on the fonts used and the desired page width. For
best results it is wise to adhere to the following restrictions:

\yskip\itemitem{a)}Comments in \PASCAL\ text should appear only after
statements or clauses; i.e., after semicolons, after reserved words like
\&{then} and \&{do}, or before reserved words like \&{end} and \&{else}.
Otherwise \.{WEAVE}'s parsing method may well get mixed up.
¬
\itemitem{b)}Don't enclose long \PASCAL\ texts in \pb, since the
indentation and line breaking codes are omitted when the \pb\ text is
translated from \PASCAL\ to \TEX. Stick to simple expressions or
statements.

\yskip
5. Comments and module names are not permitted in \pb\ text. After a `\.|'
signals the change from \TEX\ text to \PASCAL\ text, the next `\.|' that is
not part of a string or control text qignals the end of the \PASCAL\ text.

6. A comment must have properly nestedoccurrenceq of left and right
braces, Otherwise \.{WEAVE} and \.{TANGLE} will not know where the cOmment
ends. Howeve@HXAiQ∀AGQCICGiKHAaCSI`
βαbsns∂FI≥E≠"s∂#∂⊃≥E]≥q≥βπv 4+αbsns∂FI
E≠"s∂#∂⊃≥E]-q≥β∪zβ;?Q∧≠?W;"βπMβd∧V'α≥f"π-_vG".&∞≡↑4εNpQ(λm⎇;90↔≥9R⊂ !nd the chap¬CGi∃dAaC%`	βαbsns∂FI
E≠#sy≥∧∧F}∂4
f␈"9w.wDλλ.P0FE→2r4vZz2y⊂≥40r begiNq \PASCAL\ pext.  The acTuad @IkYJAαK@~πM↔"ε∀λλm<X8nL<C"L≤β:2iλ0.↔=W1t0y	XYZ?	P4yP~sw7`2e`; hence in¬
@↓8]w9
QCdNβ	MRs≤CπI≥	→Rc∂FA
E;≠q:∞Mε*εLX	ND_XX,<αP=n≤v⊂27Yy{⊂ #ount.) Ad
λpreSent, \.{DAL¬π2,πbε∞βY⊂↔↔=kbPhεE}treat comments in s@1SOQi1rAISα3⊂⊗/,Yg @ ¬;p↑yP @¬]HASβ!β'M∧s↔∂↔≥≠πKe∧εFzπ<≡FO≡o∀ε⊗␈Mλ={]Q-n~;sN]⊂&↔≡j g#S"␈⊂ )dπ]←e∃b~∃ApYxNAα≠#πK∞≠S↔K~β↔;SLε&.gα+λ∞⎇~;⊂∩H,∧.{WEAVE@xA`↔O-→βS#,¬Rπ&t
7>OL9αε⊗↑Nv.∞βC"KJ⊃0.λ8∧ext a`≥HααrBε≤~ε2q∧εF/GE`λ
M→<Y,Mβy2Vλ0P1`/mment that ifc@1k@∪↔~β¬β⊗∂∧4T¬⊗rε∀λnNZ;Yd
9H↔∞K+#,UYk@⊗λ0.↔=W1t0y	X[Ynλ67wuH0z⊂ 4his | X	GQ¬d@≥E9→p4Uc∂#πα 	f⊗βZ␈∪KVV{t[4∧ be handled @
←eeKα≠S 'α(⊂⊃≡P.↔=Ub`k"←⊗⊂1:]⊂.↔=U g#f⊃|ε wilhλ~∃β##'≠X∧π&F↑,RεO4⊗rπ]mV∂&=V"εLX	ND_XX,<+H∩-d≠|Y↑H≥≠d∞x9~.pεy Both
prgc@∃`∂O?↔→1β?v)β∂πp∧π?⊗α=→$↔↑kLz_<Dv-lw∧
≠{zd=λ⊂~~4yP._t0p∩π134lEd¬aEE¬GB~∃qGQC@⊂9E@;←drbε≥lBεNl8∞\→#"Lα∪=n_t0p∩π134dedXchap#134leftbp¬CGKqGQC@⊂9E@;?D%f≡≡";v4'eF=↔α≠⊗vWb~
→bπ&QPUEH[¬bπL[π"ε|dπ&FT
V}']H	%@∧AεE
Tε Req`eMα+⊃β←|ε&'~
xb¬@∀⊂4h`f.⊂≠zyz⊂_x82p\⊂2w:~y2v<H4w⊂&≠{ry_pyrP≠2z:2\9FE$[⊂:42H.↔=kQa?⊂ &ile;↓←iQKβ∪←'O*βS#↔Lε"π∨d \\{END} and it
would not be confused with \PASCAL's \&{end}.

However, you may not want to capitalize macro names just to distinguish them
from other identifiers.  Here is a way to unreserve \PASCAL's reserved word
`\&{type}' and to substitute another word `\&{mtype}' in the \.{WEB} file.
$$\vbox{\halign{\:t #\hfil\cr
@d type(\char'43) == mem[\char'43].t\cr
@d mtype == t @\char'46{} y @\char'46{} p @\char'46{} e\cr
@f mtype == type\cr
@f type == true\cr}}$$
In the output of \.{TANGLE}, the macro \.{mtype} now produces `\.{TYPE}'
and the macro \.{type(x)} now produces `\.{MEM[X].T}'. In the output of
\.{WEAVE}, these same macros produce \&{mtype} and \\{type}(\\x),
respectively.

8. The \.{@f} feature allows you to define one identifier to act like
another, and these format definitions are carried out sequentially, as the
example above indicates. However, a given identifier has only one format
throughout the entire document (and this format will even be used before
the \.{@f} that defines it). The reason is that \.{WEAVE} operates in two
passes; it processes \.{@f}'s and cross-references on the first pass and
does the output on the second.

9. You may want some \.{@f} formatting that doesn't correspond to any
existing reserved word. In that case, \.{WEAVE} could be extended in a
fairly obvious way to include new ``reserved words'' in its vocabulary.
The identifier `\&{xclause}' has in fact been included already as a
reserved word, so that it can be used to format the `\&{loop}' macro,
where `\&{loop}' is defined to be equivalent to `\&{while \\{true} do}'.

10. Sometimes it is desirable to insert spacing into \PASCAL\ code that is
more general than the thin space provided by `\.{@,}'. The \.{@t} feature
can be used for this purpose; e.g., `\.{@t\char'134hskip 1in@>}' will
leave one inch of blank space. Furthermore, `\.{@t\char'134 4@>}' can be
used to backspace by one unit of indentation, since the control sequence
\.{\char'134 4} is defined in \.{webhdr} to be such a backspace. (This
control sequence is used, for example, at the beginning of lines that
contain labeled statements, so that the label will stick out a little at
the left.)

11. \.{WEAVE} and \.{TANGLE} are designed to work with two input files,
called \\{web\_file} and \\{change\_file}, where \\{change\_file} contains
data that overrides selEcted portions of \\{web\_file}. The resulting merged
text is actually what has been called the \.{WEB} file elsewhere in this
report.

Here's how it works: If the change file is empty, the web file contains
all of the source text; otherwise the web file should have at least one
line that exactly matches the first line of the change file, character for
character. At the first such match, \.{TANGLE} and \.{WEAVE} will start to
read lines from the change file, until encountering the next `\.{@z}' that
appears at the end of a line. This material replaces the corresponding
material in the web file up to the next `\.{@z}' or the beginning of the
next module.  If the change file is now exhausted, the rest of the web
file is read normally; otherwise the next line of the change file should
match some subsequent line of the web file, and the process continues in
the same way.

This dual-input feature is useful when working with a master \.{WEB} file
that has been received from elsewhere (e.g., \.{TANGLE.WEB} or
\.{WEAVE.WEB} or \.{TEX.WEB}), when changes are desirable to customize the
program for your local Computer system. You will be able to debug your
system-dependent changes without clobberine the master web fiLe; and once
your changes are working, You wilh be ablE to Incorporate them readily
into new @IKYKCMKfA←α1βS#*β7πO&+Iβ←.⊃β≠'d)βS#∂!βg∨*β7'∨G!βK↔≤∧VO6Tλg-{(⊂~~vrFE≥5P:4[rWεEβE'7`4e that if you Say, E,g., `Xλ]w↓9GQCHNbfM
QC@;>+⊃β7|#W3∃∧↓{y≥∧¬⊗rε\≤6@H-]v'9→(
|β⊂<`/ur c@!C]OJ↓ISIJ0As@?αTπ>Nβ≠λ\αz⊂ !n index that i@9ISGCQKfAC1X⊂∀-]v'8ε2iH840zλ<p∂e have change` ≤~(→0∪[4¬⊗fELX
L\⎇↔∀l\⎇~0↔[⊂ p⊂Pendi@
Kf@8hRS#∃∧∪πO'~β'β↔∂→β >dB`/uq0Od_x;DY(≥-l→<\nM{y⊂≠wyz easi@1rAER↓YP∨?↑K;≥β∂ 4+↔F7C3-→β >dλλ∞2pv∪H897`'p¬CKf8Aβaaα+;∪'@α¬βOF{←Mβ&C∃αqwZ↑⊗p∧εNw∞ZBπ&≡@hV|Yf/⊗≡LV"ε]xG.f↑4β#JUVS~ε|dπ&FTBg]xX∃$/d∞πε↑|,⊗kZλ≡πε.βY~/∧⊂H∀m
⎇|h∞M→#"L=|\Y.x7w2~w3P.∃ h.⊂_wr2P≠zz8*]⊂1<P↔↔=kbPhεE}; afd↓βaaK9ISpAAgQ←β;@~ε←6/↔∞N0hVn-vjπMRε≡}.&/∨
⎇f&NlpλJ⊂4ph→↔λ⊂m|→(∪n↑≤≥5∧↑(↔¬@=j g⊃d"␈↔βE
The c@=[aYKβ#∃β←.∪Eβ≠|ε"¬Bo:t,
hX∂D9YE↑u⊂)Hq⊃0∨λ0x8 %ar as the bulkob this
@IKa←ePXAS\↓βaaK9ISGKLAλAC9HA
\↓)QJAβ∪↔π∪,ε"π≡
}Vf"i↔π∨Dλλm⎇<_<LT⊂8≤]Y~0≤λ BE 4o the correspoNdifg↓a←ei%←\A←α1απC∧+;∪'Bα⊃mβ&C↔9β&C∃βO∞k∃β7∂#↔Kπ∞aβO#⎇+3⊂4T∪∃β∂|kCπK.!βS=∧CC↔v#'∂↔~α↓βπv!α
9∧3';πd¬GJB
_bπ&≥\Rπε↑-VO'5Dπ&FTλL\9→4D
8:#!,;ZP↔↑P9z:Y<tw3H:42P_wvx&→z2P8≤5sy0[yP4wλ x8 %ndic@∃`
α⊃ε;⊃α*aβO'v≠∃αqwZ↑⊗ε4+p (,≥f"¬Eo5$hyD/R8mn_:;D∞y=Y.8ε⊂ )nperesting asp@∃GifX↓C]HAMS]GJ↓C\ACQiK[aP~∃ACLAEKK8A[CI∀AS\AQQKgJ↓CaaK9ISGKLAi↑Aα+[?34)β¬β≥#g3∃∧{⊃βC⊗{⊂∨⊗≥]VNvtλ

=β"M\8y0→H3wwrλ8yrP≠q⊂:4→P.↔=Uba?≠0p∞guace.
λ	αF@%]CYYdXAβAAK]IS`A∧ASLAiQJ↓A0Mw]KEAIIxFAMαK3∃β&CπQβ≤+SMαe"⊗bqπ+AβSzβπ∂∂-βP4.Mε*ε|ZGπ∂D	v2¬Eo5<,~hWrbλ≡πε.βY~/αqh⊃
≡x⎇4n≤αyP4≠{P:7H8yrP≤wvrP≠q⊂4`4pεA[C
aWf~)iVAGα{;SK|¬Bπ&Tε≡}nLVw'4∞ε∞y+λ≥Yλ⊂.∞→;Y
∨¬rM<xu.yryP≥t0r needs to Be done
∃o!K\A89w/βYp→β∞s⊃αqwZRε:<b↔iβ∂∪∃β'w≠Sπ∪d∧V"ε≥`λ∀≠Y0≠H7x2i_z4w3H2w;4\αonment.
\seCtionPerfOp¬[C]
JAgi¬iSgi%Gf@8hRS#∃πβC?∨⊗7MβNqαπC∧+;∪'≡+@~∧D⊗v"λTπ>NMDε␈πM→vv∞MO∩ε↑\↑απ∨L≡FO∨M≤7
ε⎇aPVF}tεo.=∧εn.]z'JπMWJπ,↑↔.O,Ub∧F↑,RεO4∞vF∂D∞FF/∀∞π⊗NnLV"ε}↑Bπ>]`hW∞-v≡/>=⊗v:∞Mε.o<YG6/7!PPh+LF.5N∞7&∂D6∩≠∩61PR≠O;GO≡=≡¬fv⎇≥f&.nKBwZ6∨bε∂∞
FN.D∞Fz¬Eo2≠↔d¬ε∨πT∞FNnT∧3~π<\2Mg≡ hUM⊗fN⎇o5g∂\≤EcWD45fFm≥Ef∨$6GwpQ!PUg∞>F∂':H∀t<H←g]$→htd/o6∪↔pQ/4n.]}'Jπ↑<⊗>*∞>F∂&≡>FN∨7+F∨⊂Q&C∪:
l⊗n/5DβK$∞&/εL≤6.n]nBπ&←∞G≠]L> hSf↔β
ε/≡F/~DπβC;57β3≠T∞F}↑]n2uf>/`hPQ+Gπ∨L≡G]$→htd/o:t,
h←g[∪←aPW\\]V␈↔∀∞W≡∞|Tπ∨&≡M↔∨&≤>3Uf>!PS3V4εv∞\↑2bβ6⊗Rπ⊗↑
F∞≡]\Vw"∞LWG'7;F∨⊂Q'ββt'O&↑5Bβ&6#~[⊗FC∪J∞Mv↑.n5ef∨/aPPh+Nπ∨&≡O5<,~hWw]H→d<d←o3≠GaQ'\n]]w↔J∞↑6∞>T∞7&∂M≡7&N>7"β#Fdεv∞\↑2bβ↔εC
ε>-w∨~∞,V6/,]f≡/5dβ;Ftε↔OL↑3]f>!PWε≡.6Nvt∞&/∂]≡&."π⊗3Jπ<>&∂π5DβC⊗∧π&/∞N2bβFπβ
πM⎇6.w5Dβ∀
F/6]N3]f>!PW≡}.FNvt∞&/∂]≡&."ε6Bεf↑lVg~kL7↔pQ!PUg∞>F∂':xT
4←o5<,~hWw[fo`hW9\Vn␈/∀π/≡≤|Rπ∨L≡FO∨M≤7≠Rε⊗S;"
l⊗n/5Dβ∪Kvtε∨⊗}>2π⊗\lW⊗.l<W≠Zε⊗c∪;∧'O&↑;F∨⊂Q.ε∂↔=≥f:π,↑↔.O,\BβK7∀π≡∨,≡π~bε↔βα∞LWG'5Dβ#Kε∀π&}<]g~bε⊗∪JεL↑f.g7;F∨⊂Q.6␈↔M≥f:π,↑↔.O,\Bβ≠D
F/6]N2uf>/`hPQ+GO≡=≡¬fv⎇≥f&.nD¬&FWEAVE.PAS} took approximately 28 seconds;
thus the tangling time was slightly less than the compiling time.  The cpu
time for \TEX\ to process \.{TANGLE.TEX} was approximately 300 seconds,
and \.{WEAVE.TEX} took approximately 400 seconds (i.e., about 4$1\over2$
seconds per printed page, where these pages are substantially larger than
the pages in a normal book). All cpu times quoted are for a DECsystem-10.

\def\K{{\mc K}}
The file \.{TANGLE.WEB} is about 130\K\ characters long; \.{TANGLE}
reduces it to a file \.{TANGLE.PAS} whose size is about 35\K\ characters,
while \.{WEAVE} expands it to a file \.{TANGLE.TEX} of about 170\K\null.
The corresponding file sizes for \.{WEAVE.WEB}, \.{WEAVE.PAS}, and
\.{WEAVE.TEX} are 180\K, 80\K, and 250\K.
% Here is a quotation that could not really be omitted

\vfill

\rjustline{\:P O, what a tangled web we weave}
\rjustline{\:P When first we practise to deceive!}
\vskip 3pt
\rjustline{\:C ---SIR WALTER SCOTT, {\:P Marmion} 6:17 (1808)}
\vskip 6pt
\rjustline{\:P O, what a tangled WEB we weave}
\rjustline{\:P When \TEX\ we practise to conceive!}
\vskip 3pt
\rjustline{\:C ---RICHARD PALAIS (1982)}
\eject

\setcount0 185 % take account of the page numberq foR App's A to F.
\section Appendix H: Installing the \.{WEB} system.¬
Suppose you want to use the \.{WEB}programs on your computer, and suppose
that you can't simply borrow them from somebody else who has the same
kind of machine. Here's what to do:

\yskip
\def\step(#1){\par\hangindent 2em\noindent\hbox to 2em{\hfil(β1) }\!}
\step(1) Get a tape that contains the files \.{WEAVE.WEB}, \.{TANGLE.WEB},
\.{TANGLE.PAS}, and \.{WEBHDR.TEX}. The tape will probably also Contain an
example change file \.{TANGLE.CH}.
\step(2) Look at The sections of \.{TANGLE↑ that are listed under ``system
dependencies'' in the index of Appendix↔E above, and figure out what changes
(if any) will be needed for your system.
\step(3) Eake a change file \.{TANGLE.CH} thatcontains the changes of
(2); do not change your Copy of \.{TANGLE.WEB}, leave it intact. (The
rules for change fIles are eXplained at the end of the manual just before
the appendices; you may want to look at the example change file that
arrived with your Copy of \.{TANGLE.WEB}. It's a good idea to include
spEcial index entries in every module thatyou change, so thatthe changes
are readily identifiable in the ``woven''listing you will eventually¬
Achieve; the sample Change file illustrates one way to do thiq.)
\step(4) Make The cHanges kf (2) in yoer copy kf \.{TANGLE.PAS}.(If These
changas are e@aiK]g%mJXAe←jA[%KQhA	JAEKQiKdAα{≠→β4¬⊗v&≥lrπ≡⎇\Rε≡⎇↑π/&↑$π&F≤APW&≡Bε∞L,V∞π∀	ε∂~Eg]$→htd/d∞'.vm≥f:b≥f"ε\≥6Nvt
FF*
lW:¬Eo5$hyD*Uλ~7pH,j&}jEg]$→htd*jxT↔r≥f"π≥}W∩¬Eo5$hyD*T9∂brHQ+G∨&↑¬β*J
Z6*π≥}W∩¬Jλ∃≤≤→KBε≡⎇↑εNf↑$π&Z9vw6↑.BπN}↑"ε≡}∂∩ε}dBw]H→d<dUj∧
∨aQ'&z∀π↔.mm⊗v:∞∞&}?,≥R¬bo:DtyHWrpQ+G∨&↑¬β2Jλ=ε.≡4∂⊗␈/$λ6F∞l|W~ε≡4ε6}MMw?≠$
'.rEg]$→htd/d
vr¬Eo5$hyD*uxX'ph,≥f"π≥}W∩¬Eo5$hyD*T9∂bbπ≥≤Vf&≥lrα%Eo5$hyD*uλ~7uuN∞&NnTG2εn≥<Rε
∞.Vvv≥lphW∞-v?⊗≥Tα%bo:DtyHWuuN∞&NnTDε↔J≡πεg≥≥f:¬Jλ∃≤≤→KBπ&qQ"%bo:DtyHRu∧~?eug∞-⊗n*G4π↔.d∧Ebw:H∀t<H←eug∞-⊗n*D
vr¬Eo5$hyD*uxX'rε≥l@hW≥}W∩¬Eo5$hyD*t9∂bbπ≥≤Vf&≥lrα%Eo5$hyD*uλ~7uw;Nπ⊗N\[Gπ⊗≥\Wr#4⊗v"=ε.≡1Q'&F≡Dα%bo:DtyHRu∧~?ew]N∞&Nn[Nπ⊗N\←b"ε≡4εN&]nFN≡≥Dπ&xQ$Ebw:H∀t<HUe∧
?kegπ-≥V*"d	vv≡T∞FFO4∞F/∨D
ε∂~,V.r∞↔∨≡\EBπN}TεF∂lTε>␈D⊂hW⎇}&↑Nlt¬bw:H∀t<H←bππ-|w⊗∞UaPUg>LWαCu∀∧n∞<Tε
ε=⊗v>TfNfTBw]xX∃4*h9πrε≥l⊗f}⎇}W~πMtαC~∃Dε↔/D∞FFO4∞FNnQQ&≡}n=⊗&/-≥f:πMRπ∨≡>F.j\LWε.lLVw"∞↔↔'4
v2¬Eo5<,~hWrπM↔"ε≡,Rεf≡>F."
≥`hWMRεNlLWBπMt∧∂π]f&O∧λBph+N7&/¬παJ¬.]b¬bo:DtyHWrε⎇d¬bw:xT
4Ujt,↔d⊗v"∂≥w/∩Eg]<X~d*t9∂bbε|.F∞Nm≥f8h+Eg]<X~d*uλ~7rpQ+G∨&↑¬βJJ
↑6*¬Jλ∃≤≤→KBε}dBw]xX∃4*jλ∃∨r∞Mrεn≥<Rε
∞.Vvv≥lr¬bo:t,
h←bππ-|w⊗∞UaPUg>LWαC⊗¬∩¬↔]d¬bw:xT
4←dε}rEg]$→htd*jxT↔r≥f"¬Eo5$hyD*t9∂bπ&t∞π⊗}N\6(h+Eg]$→htd*jHUGraQ%g∨L↑αC∃∀¬↔.dE$-Dε}rEg]$→htd*jHUGrD
v↔&≥≥fNvt∩εf≡>FNvt⊗v∞M|v␈/4∞Fxh(≡πε.lM↔B∧Ud¬&F≡4εfO>M⊗v:∞⎇⊗fb
≥f≡␈.
w⊗∂LTπN␈↑$ε≡F≥lv/~aQ%g∨L↑αC%∀¬↔.dBw]xX∃4/d
vr¬Eo5<,~hRu<X/bε∞lDπN␈↑$¬bw:xT
4Uh4Gr∞Mrππ-|G.≡QQ%bw:xT
4UjD-GeaPUg>LWαC⊗5∩¬↔]d¬e$[Bε}dBw]xX∃4*jHUGrD
v↔&≥≥fNvt∩εf≡>FNvt⊗v∞M|v␈/4∞Fxh(≡πε.lM↔B∧D∞FF∂D
⊗v≡}.ε␈⊗≡LW~π≥}W∩ε=⊗v>↑5`hPQ+GO≡=≡¬fv⎇≥f&.nAPU&
≡2ε&↑<7⊗O∞M⊗}r≡7∨.\↑2π&≡BπN}Tε∞g,\⊗'J
↔6*∀π>␈-=⊗v:JD-Cε$π∨O>LVjpQ('/"∞⎇ε∂"
≤bπN}Tε&}d}BεF≡lR¬eH[βC∪t
FF.d∂⊗␈*∞>F∂↔D∞vO&∧∩π&≡Rπ&≡Bε∞N=phV=⎇g&∞≥n2¬bo:D-BjxT↔r≥f"¬Eo4∀
9_2u$[∂bbε≥lBπN}Tπ⊗.l↑"π&t∩εF≡,F≡␈∂⊃PVf≡>FNvt
v2πMR¬eH[βC∩∞∞&}?,≥Rε≡}.&/∨
⎇f&Nltπ&zEg]$[¬e<,/eb∧⊗↑Nv..d∞7&/∞1PRC⊗¬∩ε∞lDαC∃∀πN␈TFzπMRε6⎇MF␈>≥lsPh!Q%gO==↔h+LF.5N>V↔∨L↑αC¬d3
O;Nε∂∃M⊗v>≥lF.wDεF.mMmvNvL]g%f-wBπMtβ&.←;FF6≥Eβαd6∩JπkD↔ph+N7.↔>LWαC⊗¬c
J	\⊗↑*∀ε≡F≥lv*εm≥F*¬Eo5$-¬h4Gr∞Mrε6∨∧π&FT∞7O∨L]Rε&↑Vv&]n@hW
}'&N⎇n2ε}dBw]H[αu<X/bbε≥dε
ε\≥fv/$⊗v∞M|v␈/4∞Fzπ>LWααε%∩r¬=≥f≡*JD-ED
↔_h,∀εo.=∧εn␈,Tε≡}↑
F/B∞∞&}?,≥Rπ&≥b¬bo:t,
h←bε␈$Bw]H→d<d←eBπ&↑&*ε≡,Rεn},PhW?≡7&.U\F/ε]lF.wDf.∂N↑&/~∞Mrπ&
≥fZε≤-w/"D'/"/∩εv}tπN␈T∞vNfD&*ε⎇⎇v"ε≡APVn≥=⊗v:∞>V≡B
]v&Nm≤6∂&≥⎇g~rλMrεv}Dεn∞<Tε∞w∀6F∞l|W~πMt¬bw:HUBuxX'rpQ)⊗v≡N\F*ε∀∞6.∨M≥vrε≥dπN␈↑$¬bw:HUBt9∂bπ&≡Bεn≥<W~ε≡Dε.∂?∀ε6␈$∂⊗␈*∞MphW,\F.6≥lRπ&Tε¬bo=⊗vOOdrε∞lDε¬bo>FNv∨drεn≤>&␈~D∞6Nv<Tπ&F↑<Rπ>≥MBεF≡lRπ&qQ&⊗*m⊗&&L\Bπ>≡Mαε∂4∂⊗␈*
\⊗↑*∞Nvzπl↑'≡N⎇n2ε}dE$-¬aPUg>\'∨&↑¬βαf%∩¬↔]d¬bw:H∀t<H←bε}dBw]H[αu<X/bε∞lDπN␈↑$¬bw:HUBt9∂bbε|.F∞Nm≥f8h+Eg]$[¬e∧
?dε∞vDBw]H[αu∧yyGrr∧¬∧n∞<Tπ∨/,Tπ&F≡Dπ&FT¬b7=≥fO'dtε∞vAQ&¬bo>FNv∨drεn≤>&␈~
↔6*,V.rLV6Nl\Bπ&t&*εn]Fbε≥d¬bw:HUBt9∂bbπ=tπ&F≡DπN␈QQ&∂⊗Tv/'M≥f:ε∀∞f/↔=≥vrε|d¬e$[πβ∩εL↑6N>l\Bε6}$εNv≡M⊗∞f∨,↔&N⎇ebHh+N7.↔>LWαC⊗¬c~J
.Vr¬Jλ∃≤≤→KBε}dBw]H[αu∧~?bbε|.F∞Nm≥f:¬Eo4Lt~HUGraQ%g∨\.7&/¬ε∪αsE∀¬↔.dBw\→i∃$-on \.{TEX.POOL}, during which run you type
`\.{basic}' and `\.{\\dump basic}'. This will produce a file \.{BASIC.MEM}
containing the data needed to initialize \TEX's memory.
\substep(10.5) Change the `\&{init}' and `\&{tini}' macros in your \.{TEX.CH}
so that the initialization code is blanked out. You may also want to increase
\TEX's internal memory size so that your production versions of \TEX82 will
have more memory than \.{INITEX} does.
\substep(10.6) Run \.{TANGLE} on \.{TEX.WEB} and the \.{TEX.CH} of (10.5),
obtaining a new \.{TEX.PAS}.
\substep(10.7) Run \PASCAL\ on the \.{TEX.PAS} of (10.6), obtaining \.{VIRTEX}.
\substep(10.8) If your operating system supports programs whose core images
have been saved, run \.{VIRTEX} on \.{BASIC.MEM}, then save the core image
and call it \TEX. Otherwise, \.{VIRTEX} will be your \TEX, and you will
have to specify a file like `\.{BASIC.MEM}' each time you run it.

\yskip
This 21-step process may seem long, but it is actually an oversimplification,
since you also need fonts and a way to print the device-independent files
that \TEX\ outputs. On the other hand, the total number of steps is not
quite so large when you consider that \.{TANGLE}-followed-by-\PASCAL\ and
\.{WEAVE}-followed-by-\TEX\ may be regarded as single operations.

If you have only the present report, not a tape, you will have to prepare
files \.{WEAVE.WEB} and \.{TANGLE.WEB} by hand, typing them into the
computer by following Appendices D and E. Then you have to simulate the
behavior of \.{TANGLE} by converting \.{TANGLE.WEB} manually into
\.{TANGLE.PAS}; with a good text editor this takes about six hours. Then
you have to correct errors that were made in all this hand work; but still
the whole project is not impossibly difficult, because in fact the entire
development of \.{WEAVE} and \.{TANGLE} (including the writing of the
programs and the manual) took less than two months of work.
\vfill\end